package SocketTest;

import java.net.Socket;
import java.util.Scanner;

public class Client {
    public static void main(String[] args) {
        try {
            Scanner sc = new Scanner(System.in);
            while (sc.hasNext()){
                String input = sc.nextLine();
                Socket socket = new Socket("127.0.0.1",8080);
                System.out.println("input:"+input);
                socket.getOutputStream().write(input.getBytes());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
